<?php
session_start();
if(@$_SESSION['V']!==1){
    ?>
    <!DOCTYPE html>
    <html>

    <head>

        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <title>广西水利电力职业技术学院 | 查询成绩</title>

        <link href="css/bootstrap.min.css" rel="stylesheet">
        <link href="font-awesome/css/font-awesome.css" rel="stylesheet">

        <link href="css/animate.css" rel="stylesheet">
        <link href="css/style.css" rel="stylesheet">

    </head>

    <body>
    <?php
    include "header.php";
    include "Snoopy.class.php";
    $sn = new Snoopy();
    $sn->cookies= $_SESSION['cookies'];
    $sn->agent = "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko";
    $sn->referer = "http://jw.gxsdxy.cn/jiaowures/";
    $sn->rawheaders['Pragma'] = 'no-cache';
    $sn->rawheaders['X_FORWARDED_FOR'] = "jw.gxsdxy.cn";
    $sn->fetch("http://jw.gxsdxy.cn/jiaowures/JWXS/cjcx/jwxs_cjcx_like.aspx?usermain=x{$_SESSION['stuid']}");

    $ret=mb_convert_encoding($sn->results,"utf-8","gb2312");
    $pattern = '/<table id="cjxx" cellspacing="0" cellpadding="0" border="1" bordercolorlight="#588FC7" bordercolordark="#ffffff" bordercolor="#588FC7" border="0" style="border-color:#588FC7;width:100%;border-collapse:collapse;">(.*?)<\/table> /is';
    preg_match_all($pattern, $ret, $matches);



    ?>
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-lg-10">
            <h2>查询成绩</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="index.html">首页</a>
                </li>
                <li>
                    <a href="cxcj.php">查询成绩</a>
                </li>
                <!--                        <li>
                                            <a>UI Elements</a>
                                        </li>
                                        <li class="active">
                                            <strong>Buttons</strong>
                                        </li>-->
            </ol>
        </div>
        <div class="col-lg-2">

        </div>
    </div>
    <div class="row wrapper wrapper-content animated fadeInRight">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>你的成绩 </h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="table-responsive">

                    <table class="table table-striped">
                        <!--                        <thead>-->
                        <!--                        <tr>-->
                        <!--                            <th>#</th>-->
                        <!--                            <th>Data</th>-->
                        <!--                            <th>User</th>-->
                        <!--                            <th>Value</th>-->
                        <!--                        </tr>-->
                        <!--                        </thead>-->
                        <tbody>
                        <?php echo $matches[1][0]; ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

    </div>

    <?php
    include "footer.php";
    ?>

    </body>

    </html>
    <?php
}else{
//    session_destroy();
    echo "<script type='text/javascript'>
                    alert('功能未开放！');
//                    location.href='jw.php';
                    history.back();
                   </script>";
}
?>